﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Tauren.Business.Entity.Global;
using Tauren.Business.Entity.ValidationAttributes;

namespace Tauren.Business.Entity.Input
{
    public class Employee_input
    {
        public virtual int EmpId { get; set; }
        /// <summary>
        /// 中文名
        /// </summary>
        [Display(Name = "中文名"), Required(ErrorMessage = "{0}不能为空!"), StringLength(20, ErrorMessage = "{0}不超过20个字符")]
        public virtual string CNName { get; set; }

        /// <summary>
        /// 英文名
        /// </summary> 
        [Display(Name = "英文名"), Required(ErrorMessage = "{0}不能为空!"), StringLength(50, ErrorMessage = "{0}不超过50个字符"), RegularExpression(@"^([a-zA-Z0-9_ ]){1,50}$", ErrorMessage = "请输入英文字符、数字组成的{0}")]
        public virtual string ENName { get; set; }

        /// <summary>
        /// 员工编码
        /// </summary>
        [Display(Name = "员工编码"), Required(ErrorMessage = "{0}不能为空!"), StringLength(10, ErrorMessage = "{0}不超过10个字符"), RegularExpression(@"^([a-zA-Z0-9_]){1,20}$", ErrorMessage = "请输入英文字符、数字组成的{0}")]
        public virtual string EmpCode { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name = "邮箱"), Email(ErrorMessage = "{0}格式不正确!")]
        public virtual string Email { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [Display(Name = "电话"), PhoneValidation(ErrorMessage = "电话格式不正确!")]
        public virtual string Phone { get; set; }

        /// <summary>
        /// 组织ID
        /// </summary>
        [Display(Name = "组织ID"), Required(ErrorMessage = "{0}不能为空!")]
        public virtual string OrgId { get; set; }

        /// <summary>
        /// 职位ID
        /// </summary>
        [Display(Name = "职位ID"), Required(ErrorMessage = "{0}不能为空!")]
        public virtual string PositionId { get; set; }

        /// <summary>
        /// 单位ID
        /// </summary>
        [Display(Name = "单位ID"), Required(ErrorMessage = "{0}不能为空!")]
        public virtual int UnitInfoId { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public virtual string Gender { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        [Display(Name = "年龄"), Age(ErrorMessage = "{0}不能大于120，不能小于0")]
        public virtual int? Age { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary> 
        public virtual string IdCard { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public virtual int Status { get; set; }

        /// <summary>
        /// 汇报人
        /// </summary>
        public virtual int Repoter { get; set; }

        public virtual string BirthDay { get; set; }

        public virtual string JoinDate { get; set; }

        public virtual string Address { get; set; }

        public virtual List<PersonInfo_InPut> Reporters { get; set; } = new List<PersonInfo_InPut>();
        public virtual List<Parttimeinfo_InPut> PartJob { get; set; } = new List<Parttimeinfo_InPut>();
    }
    public class PersonInfo_InPut : PersonInfo
    {

    }
}
